home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dbase / lib19.zip / LIB19TOC.ZIP / LIB19TOC.TXT
Encoding:
Text File  |  1992-10-14  |  57.2 KB  |  1,071 lines

  1. ===============================================================================
  2.                                 LIB19TOC.TXT
  3.                               Table of Contents
  4.                     For the dUFLP LIBRARY Files (attached)
  5.                (dUFLP = dBASE User's Function Library Project)
  6.                                Version 1.9
  7.                                  10/14/92
  8. ===============================================================================
  9. Some of the places routines are placed may seem a bit arbitrary -- they are. 
  10. These decisions were made based on the functions/procedures I use the most in 
  11. my own routines. Since the original purpose of this library was my own use, 
  12. I felt it my prerogative to be the one to make the final decision as to what 
  13. routines were left in PROC.PRG, and which got moved to the LIBRARY files. 
  14.  
  15. Included in this LIBRARY System are the following files:
  16.  
  17. Text Files
  18. README.TXT   -- You're looking at it.
  19. WHATS.NEW    -- This is a description of the new features for this system.
  20. CONTRIB.TXT  -- How to contribute to the Library Project.
  21. JPMOUSE.TXT  -- An explanation from Jay on the JPMOUSE.BIN file, attached
  22.                 (with his permission). See also the function ISMOUSE() and
  23.                 procedure file SETMOUSE in PROC.PRG.
  24. DISK.TXT     -- A very brief discussion on the use of DISK.BIN.
  25. SEARCH.TXT   -- A very brief discussion on the use of SEARCH.BIN.
  26.  
  27. Procedure and Library Files -- Described Below
  28. ARRAY.PRG
  29. COLOR.PRG
  30. CONVERT.PRG
  31. DATES.PRG
  32. FIELDS.PRG
  33. FILES.PRG
  34. FINANCE.PRG
  35. FRPG.PRG
  36. MEASURE.PRG
  37. MISC.PRG
  38. NAVIGATE.PRG
  39. OBSOLETE.PRG
  40. PROC.PRG
  41. SCA.PRG
  42. SCREEN.PRG
  43. STATS.PRG
  44. STRINGS.PRG
  45. TIME.PRG
  46. TRIG.PRG
  47. WINDOWS.PRG
  48.  
  49. BIN Files -- used in routines attached.
  50. JPMOUSE.BIN
  51. DISK.BIN
  52. SEARCH.BIN
  53.  
  54. Below is a quick list of all the procedures and functions included in the 
  55. library files in the sequence they are presented in the programs themselves:
  56.  
  57. ===================================
  58. PROC.PRG -- The MAIN PROCEDURE File
  59. ===================================
  60.  
  61. ----------------------------------
  62. MESSAGE/SCREEN PROCESSING ROUTINES
  63. ----------------------------------
  64. PrintErr    -- used to display a "standard" error message for printer 
  65.                errors (is it on, online, out of paper?).
  66.                Usage: do PrintErr
  67. Open_Screen -- Used to add texture to the background for an opening screen or
  68.                menu.
  69.                Usage: do Open_Screen
  70. JazClear    -- performs a nice center to edge of screen clear (using a box) ...
  71.                Usage: do JazClear
  72. Wipe        -- performs a left-to-right wipe of a window. Nice effect.
  73.                Usage: do Wipe with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  74. Center      -- used to center text anywhere on the screen (optional colors).
  75.                Usage: do Center with <nRow>,<nWidth>,"<cColors>","<cText>"
  76. Surround()  -- Used to display text at X,Y position, surrounded with a double-
  77.                line box.
  78.                Usage: Surround(<nRow>,<nCol>,"<cColor>","<cText>")
  79. Message1()  -- Displays a single-line message, waits for user to press a key
  80.                before program moves on.
  81.                Usage: Message1(<nRow>,<nWidth>,"<cColor>","<cText>")
  82. Message2()  -- Same as above, but displays message in a window (with shadow).
  83.                Usage: Message2("<cText>","<cColor>")
  84. Message3()  -- Same as above, but will handle LONG messages, wrapping inside
  85.                window.
  86.                Usage: Message3("<cText>","<cColor>")
  87. Message4()  -- 2-Line message in a window, pauses for user.
  88.                Usage: Message4("<cText1>","<cText2>","<cColor>")
  89. Monitor     -- Displays a box, showing total records in database -- is designed
  90.                to be used in a system that does a record-by-record update, 
  91.                so the user knows something is happening. You need to add code
  92.                to display actual record numbers as the task is happening.
  93.                Usage: do Monitor with "<cText>","<cColors>"
  94. Monitoroff  -- Cleanup for Monitor procedure above.
  95.                Usage: do MonitorOff
  96. ScrnHead()  -- Used to display a screen header inside a box (with a shadow).
  97.                Usage: ScrnHead("<cColor>","<cText>")
  98. YesNo()     -- Used to ask a "yes/no" type question, allows three lines of 
  99.                message, and uses menu pads to choose (move cursor, press 
  100.                <enter>).
  101.                Usage: YesNo(<lAnswer>,"<cMess1>","<cMess2>","<cMess3>",;
  102.                              "<cColors>")
  103. YesNo2()    -- As above, but allows programmer to choose position on screen.
  104.                Usage: YesNo2(<lAnswer>,"<cWhere>","<cMess1>","<cMess2>",;
  105.                            "<cMess3>","<cColors>")
  106.                    where cWhere may be one of the following:
  107.                          UL = Upper Left
  108.                          UC = Upper Center
  109.                          UR = Upper Right
  110.                          CL = Center Left
  111.                          CC = Center Center
  112.                          CR = Center Right
  113.                          BL = Bottom Left
  114.                          BC = Bottom Center
  115.                          BR = Bottom Right
  116.                    Anything else will default to CC.
  117. ErrorMsg()  -- Allows 2 lines of message, first is ** ERROR **, or optionally,
  118.                ** ERROR # **  where '#' is a number (if "<cErr>" is empty,
  119.                (""), system uses first option, but there must be SOMETHING
  120.                there). 
  121.                Usage: ErrorMsg("<cErr>","<cMess1>","<cMess2>","<cColors>")
  122. Shadow      -- Used for windows/boxes to display a shadow, giving 3-D effect.
  123.                Usage: do Shadow with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  124. VPick()     -- Multiple-item Picklist -- this routine will allow you to create
  125.                a simple vertical picklist of items, returning the first letter 
  126.                of the option selected, or a null string if the user pressed 
  127.                <Esc>.
  128.                Usage: VPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  129.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  130. HPick()     -- Very much like VPICK() above, but does a Horizontal Picklist.
  131.                Usage: HPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  132.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  133.  
  134. -------------------------
  135. COLOR PROCESSING ROUTINES
  136. -------------------------
  137. SetColor    -- Sets colors to contents of a memvar to handle various parts of
  138.                the screen. THIS IS A NEW ROUTINE -- USERS OF THE OLD 
  139.                SETCOLOR and SETCOLOR2 ROUTINES SHOULD CHECK "OBSOLETE.PRG".
  140.                Usage: do SetColor with <cColorVar>
  141. ReColor     -- Restores colors to those held in a string of the form returned
  142.                by SET("ATTRIBUTE").
  143.                Usage: Do ReColor with <cColors>
  144. ColorBrk()  -- Returns one of three portions of a color variable as used in
  145.                many of my own routines (YESNO, etc.). Used for explicitly
  146.                setting colors.
  147.                Usage: ColorBrk(<cColorVar>,<nField>)
  148.  
  149. ----------------------------
  150. STRING MANIPULATION ROUTINES
  151. ----------------------------
  152. AllTrim()   -- Trims both sides of a character field/memvar.
  153.                Usage: AllTrim(<cString>)
  154. State()     -- This is used for validation of a STATE (two letter) code ... 
  155.                (returns .t. or .f.) -- useful for data entry.
  156.                Usage: State(<cState>)
  157.  
  158. ----------------------
  159. DATE HANDLING ROUTINES
  160. ----------------------
  161. DateText()  -- Convert date to Month Day, Year format.
  162.                Usage: DateText(<dDate>)
  163. DateText2() -- As above, adds day of week (DoW, Month Day, Year).
  164.                Usage: DateText2(<dDate>)
  165. Age()       -- Returns the age of someone as of DATE(), given their birthdate.
  166.                Usage: Age(<dDate>)
  167.  
  168. -----------------------
  169. FIELD HANDLING ROUTINES
  170. -----------------------
  171. IsUnique()  -- Used to check a keyfield in a database to see if it's unique.
  172.                Usage: IsUnique(<xValue>,<cOrder>)
  173.  
  174. --------------
  175. MISC. ROUTINES
  176. --------------
  177. SetPrint    -- Used to setup the printer memory variables for a print job.
  178.                Usage: do SetPrint
  179. DosRun()    -- Used to execute a DOS command/program from inside dBASE, handles
  180.                windows and such by restoring them when done.
  181.                Usage: DosRun(<cCmd>)
  182. ScrnRpt()   -- Shows a dBASE Report on screen, and pauses when the screen is
  183.                full.
  184.                Usage: ScrnRpt(<cRpt>)
  185. SwitchLib() -- Changes the current library file to another. Useful when doing
  186.                quick changes to execute a function/file in another library.
  187.                Usage: SwitchLib(<cNewLib>)
  188. IsMouse()   -- Looks at system for a mouse driver, if there, it turns off
  189.                the mouse. Uses JPMOUSE.BIN.
  190.                Usage: IsMouse()
  191. SetMouse    -- Used to toggle a mouse, requires JPMOUSE.BIN and a public
  192.                memvar c_Mouse set to the most current state ("OFF" means
  193.                the mouse is "OFF" ... and will be toggled ON in the next
  194.                call to SetMouse).
  195.                Usage: On Key label ... DO SetMouse
  196. VerLevel()  -- Used to return numeric value of current version of dBASE or
  197.                RUNTIME. Useful with those version specific routines.
  198.                Usage: VerLevel()
  199.  
  200. =============
  201. LIBRARY FILES
  202. =============
  203.  
  204. The following files are the 'library' files that contain all routines in this
  205. system not contained in PROC.PRG. See the section of this document marked
  206. 'INSTRUCTIONS' for how to use these. Please notice that some functions which
  207. are used in specific LIBRARY files (such as NAVIGATE.PRG, which uses some of
  208. the functions in TRIG.PRG) are duplicated in some of the other library files.
  209. This was done to make life easier on the programmer. Since dBASE IV, 1.5 does
  210. not allow multiple library files (although one can hope for such a feature in
  211. future editions), we are stuck having to duplicate some routines.
  212.  
  213. -----------------------------
  214. SCREEN.PRG -- Screen Handling
  215. -----------------------------
  216. Radio()     -- This routine creates a "radio-button" routine. You can have
  217.                up to four options. Returns # of item chosen ...
  218.                Usage: Radio(<nULRow>,<nULCol>,<nChoice>,"<cTxt1>","<cTxt2>",;
  219.                              "<cTxt3>","<cTxt4>","<cTitle>","<cColor>")
  220. CheckBox    -- This routine does a "CheckBox" much like Windows/Mac type
  221.                software, with up to four options. NOTE -- the items marked
  222.                in the format must be a) logical, and b) fields/memvars.
  223.                They cannot be literal values, due to limitations of dBASE
  224.                parameter handling.
  225.                Usage: Do CheckBox with <nULRow>,<nULCol>,<lChk1>,<lChk2>,;
  226.                                         <lChk3>,<lChk4>,"<cTxt1>",;
  227.                                         "<cTxt2>","<cTxt3>","<cTxt4>",;
  228.                                         "<cTxt0>","<cColor>"
  229. MenuPad()   -- Used to define menu pad and popup bars as a specific length.
  230.                Function will truncate if longer than needed, and will
  231.                pad with spaces otherwise.
  232.                Usage: MenuPad("<nChoice>",<nLength>)
  233. Banner()    -- Used to display a scrolling "banner" message on the screen.
  234.                Usage: Banner(<nRow>,<nCol>,<nwidth>,"<cMessage>","<cColor>")
  235. SeeMatch()  -- Displays instant lookup match on a field in a shadowed box.
  236.                Usage: SeeMatch("<cFile>",<cSeekExp>,"<cReturn>",<nULRow>,;
  237.                                <nULCol>,<nBRRow>,<nBRCol>,"<cColor>")
  238. MsgExp()    -- Used to display a message (or an error message), centered on
  239.                the screen. Does not use the "(Press Space)" bits that dBASE
  240.                uses on an error message ... The message and the line on which
  241.                it is displayed will be the same color.
  242.                Usage: MsgExp("<cExp>")
  243. Dialog()    -- Routine to provide a 'standard' set of dialog boxes and buttons
  244.                for all applications. 
  245.                Usage: Dialog("<cMsg>",<nType>,"<cBorder>",<nDefBut>,<lShadow>,;
  246.                              "<cWind>","<cButton>")
  247.                nType is used to describe the dialog box type, options are:
  248.                0:      'OK'
  249.                1: 'OK' 'CANCEL'
  250.                2: 'ABORT'  'RETRY'  'IGNORE'
  251.                3: 'YES'  'NO'   'CANCEL'
  252.                4: 'YES'  'NO'
  253.                5: 'RETRY'   'CANCEL'
  254. Pick2()     -- This picklist routine creates a picklist that determines it's
  255.                own location on the screen by calling a couple of other functions
  256.                (below).
  257.                Usage: Pick2("<cLookFile>","<cTag>","<cSrchFld>","cRetFld>",;
  258.                             <nScrRow>,<nScrCol>)
  259. ScrRow()    -- Returns the row position of the current 'Get'. If the memvar
  260.                nScrRow already exists, it returns the value in that memvar.
  261.                Usage: ScrRow()
  262. ScrCol()    -- Returns the column position of the current 'Get'. Works like 
  263.                above, but for column.
  264.                Usage: ScrCol()
  265. YesNoCan()  -- A dialog box, defaults to 'Yes/No/Cancel', varies in size,
  266.                depending on programmer needs, optional row position. Nice
  267.                modification of the YESNO() function in PROC.PRG.
  268.                Usage: YesNoCan("<cAnswer>","<cMess1>","<cMess2>","<cMess3>",;
  269.                                "<cPrompt1>","<cPrompt2>","<cPrompt3>",;
  270.                                <nTopRow>,"<cColor>")
  271. ProgBar     -- Monitor program activity, so user does not get worried that
  272.                the machine went into limbo. A graphic version of what the
  273.                "MONITOR" procedure in PROC.PRG does.
  274.                Usage: Do ProgBar with <nQuan>,"<cWindCol>","<cFillCol1>",;
  275.                                  "<cFillCol2>","<cMessage>",<nWindWidth>
  276. ProgBar2    -- Same as above, but a bit simpler to use.
  277.                Usage: Do ProgBar2 with <nQuan>,"<cWindCol>","<cFillCol2>",;
  278.                                  "<cFillCol2>"
  279. MovePad     -- Moves menu pad on selection of a letter. 
  280.                Usage: Do MenuPad with <cLetter>,<lSelect>,<cChoices>
  281.  
  282. -----------------------------
  283. COLOR.PRG -- Color Processing
  284. -----------------------------
  285. AttriByte() -- Returns the attribute byte of a dBASE Color code.
  286.                Usage: AttriByte("<cCode>")
  287. ColorName() -- Converts an attribute value for an area to the name of the
  288.                corresponding color combination. 
  289.                Usage: ColorName(<nAttr>)
  290. ColorCode() -- Given a color attribute byte, returns dBASE color code.
  291.                Usage: ColorCode(<nAttr>)
  292. ColorOf()   -- Returns the color of attributes in dBASE, as currently set.
  293.                Usage: ColorOf("<cArea>")
  294.  
  295. ------------------------------------------
  296. STRINGS.PRG -- Character String Processing
  297. ------------------------------------------
  298. Proper()    -- Converts text to "proper" case (upper/lower case, handles
  299.                contractions, Mc, Mac, etc.). Useful for names (converts first
  300.                letter to upper case, the rest to lower, except as above).
  301.                Usage: Proper("<cArg>")
  302. Justify()   -- Used to justify a field or memvar (or character expression) 
  303.                within a specific field width. 
  304.                Usage: Justify(<cFld>,<nLength>,"<cType>")
  305.                    cType must be L (left), C (center), or R (right)
  306. Dots()      -- Used to pad a field with dots (dot leader, trailer ...) 
  307.                Usage: Dots(<cFld>,<nLength>,"<cType>")
  308.                    cType must be L (left), C (center), or R (right)
  309. CutPaste()  -- Used to Cut a string and Paste another in it's place. It's
  310.                an easier way to use the STUFF() function.
  311.                Usage: CutPaste(<cFld>,<cLookFor>,<cRepWith>)
  312. LastWord()  -- Used to return the last "word" of a string of characters (words
  313.                being bracketed by spaces).
  314.                Usage: LastWord(<cString>)
  315. VStretch()  -- Displays a long character field (254 char) on screen, with
  316.                wrap-around, and handles proper word-breaks - you give
  317.                dimensions for where you want it displayed (window).
  318.                Usage: VStretch(<cFld>,<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  319. AtCount()   -- Returns the number of times a string is found in another.
  320.                Usage: AtCount(<cFindStr>,<cBigStr>)
  321. IsAlNum()   -- If first character of string is alphabetic or digit, returns
  322.                .t., otherwise returns .f..
  323.                Usage: IsAlNum(<cChar>)
  324. IsAscii()   -- If first character is in ASCII (normal, not extended) character
  325.                set, returns .t., otherwise returns .f..
  326.                Usage: IsAscii(<cChar>)
  327. IsCntrl()   -- If first character is a delete or control character, returns
  328.                .t., otherwise returns .f..
  329.                Usage: IsCntrl(<cChar>)
  330. IsDigit()   -- If first character is a digit, returns .t..
  331.                Usage: IsDigit(<cChar>)
  332. IsPrint()   -- If first character is a printing character (space through
  333.                chr(126), returns .t..
  334.                Usage: IsPrint(<cChar>)
  335. IsXDigit()  -- If first character is possible hexadecimal digit, returns .t..
  336.                Usage: IsXDigit(<cChar>)
  337. IsSpace()   -- Returns .t. if first character is space, tab, carriage return,
  338.                line feed, vertical tab, or formfeed.
  339.                Usage: IsSpace(<cChar>)
  340. Name2Label()-- Returns a name held in five fields as a single field for the
  341.                purpose of printing in a label.
  342.                Usage: Name2Label(<nLength>,<cPrefix>,<cFirstName>,;
  343.                                   <cMidName>,<cLastName>,<cSuffix>)
  344. StrpBrk()   -- Search string for first occurrence of any specific character(s).
  345.                Usage: StrpBrk(<cCharSet>,<cBigStr>)
  346. RAt()       -- Reverse AT() - returns position of a character string in its  
  347.                last position in a larger string ...
  348.                Usage: RAt(<cFindStr>,<cBigStr>)
  349. StrRev()    -- Reverse a string.
  350.                Usage: StrRev(<cAnyStr>)
  351. Strip2Val() -- Strip characters from the left until reaching one that might
  352.                begin a numeric value ...
  353.                Usage: Strip2Val(<cString>)
  354. StripVal()  -- Strip characters until reaching one that is NOT part of a
  355.                number.
  356.                Usage: StripVal(<cString>)
  357. ParseWord() -- Finds first word in a character string.
  358.                Usage: ParseWord(<cW>)
  359. StripWord() -- Removes first word in character string.
  360.                Usage: StripWord(<cW>)
  361. Plural()    -- Returns the "plural" of a noun. This will fit most cases, but not
  362.                all, as English has too many exceptions. 
  363.                Usage: Plural(<nItems>,"<cNoun>")
  364. StrComp()   -- Compares the contents of two strings.
  365.                Usage: StrComp(<cStr1>,<cStr2>)
  366. StrOccur()  -- Calculates the number of occurences of a string in another,
  367.                works for character memvar/field, and memo fields.
  368.                Usage: StrOccur(<cInString>,<cFindString>)
  369. NumOccur()  -- Calculates the number of occurences of a string in another.
  370.                Usage: NumOccur(<cInString>,<cFindString>)
  371. ReplMemo()  -- Globally searches and replaces a string with another string
  372.                in a character field/memvar or memo field.
  373.                Usage: ReplMemo(<cSource>,<cCurrStr>,<cNewStr>)
  374. MemStuff()  -- Replaces a specific string in a character string, by another.
  375.                Returns the resultant string.
  376.                Usage: MemStuff(<cSource>,<cCurrStr>,<cNewStr>)
  377. Stub()      -- Returns a specific number of characters from a given string, 
  378.                adding characters in cIn to the end of it.
  379.                Usage: Stub(<cString>,<nIn>,<cIn>)
  380. FirstMem()  -- Capitalizes the first character of all the words in the string
  381.                passed as a parameter, returns resultant string (unless a memo,
  382.                in which case, returns a .T.)
  383.                Usage: FirstMem(<cInStr>)
  384. FirstCap()  -- Capitalizes the first character of a string.
  385.                Usage: FirstCap(<cInString>)
  386.  
  387. -----------------------------------------------
  388. CONVERT.PRG -- Numeric Conversions/calculations
  389. -----------------------------------------------
  390. Roman()     -- Function to return a Roman Numeral based on input of an Arabic.
  391.                Usage: Roman(<nArabic>)
  392. Arabic()    -- Opposite of Roman (takes Roman Numeral provided, returns
  393.                Arabic).
  394.                Usage: Arabic("<cRoman>")
  395. Factorial() -- Does what it sounds like, it returns the factorial of a value.
  396.                Usage: Factorial(<nNumber>)
  397. IsPrime()   -- Determines if the argument passed is a prime positive integer.
  398.                Usage: IsPrime(<nNumber>)
  399. BankRound() -- Rounds numeric argument to given # of places using "Banker's 
  400.                rule."
  401.                Usage: BankRound(<nNumber>,<nPlaces>)
  402. Num2Str()   -- Number to String, uses ASCII 1/2 and 1/4 instead of decimals
  403.                where appropriate.
  404.                Usage: Num2Str(<nNumber>)
  405. Dec2Hex()   -- Decimal to Hexadecimal conversion.
  406.                Usage: Dec2Hex(<nDecimal>)
  407. Hex2Dec()   -- Hexadecimal to Decimal conversion.
  408.                Usage: Hex2Dec(<cHex>)
  409. Hex2Bin()   -- Hexadecimal to Binary conversion.
  410.                Usage: Hex2Bin(<cHex>)
  411. Bin2Hex()   -- Binary to Hexadecimal conversion.
  412.                Usage: Bin2Hex(<cBin>)
  413. Dec2Oct()   -- Decimal to Octal conversion.
  414.                Usage: Dec2Oct(<nDec>)
  415. Oct2Dec()   -- Octal to Decimal conversion.
  416.                Usage: Oct2Dec(<xOct>)
  417. Cash2Check()-- Converts a number of dollars and cents to a string of words.
  418.                Usage: Cash2Check(<nCash>)
  419. Num2Words() -- Converts an integer to a string of words.
  420.                Usage: Num2Words(<nNum>)
  421. Thou2Words()-- Converts a positive integer less than 1000 to a string of words.
  422.                Usage: Thou2Words(<nNum>)
  423. Ord()       -- Converts an integer to ordinal representation.
  424.                Usage: Ord(<nNum>)
  425. Num2Word()  -- Converts an integer to a string of words -- self-contained
  426.                function, does not call other functions. 
  427.                Usage: Num2Word(<nValue>)
  428. Num2Real()  -- Converts a number to the ASCII representation of its storage in
  429.                IEEE 8-byte real format.
  430.                Usage: Num2Real(<nNum>,<nExp>)
  431. Dec2Bin()   -- Decimal to Binary conversion.
  432.                Usage: Dec2Bin(<nNum>,<nPlaces>)
  433. Frac2Bin()  -- Converts the fractional part of a decimal number to a
  434.                character string giving its ASCII binary representation.
  435.                Usage: Frac2Bin(<nNum>,<nPlaces>)
  436.  
  437. -----------------------------------
  438. DATES.PRG -- Date Handling Routines
  439. -----------------------------------
  440. DateText3() -- As DateText() and DateText2() in PROC.PRG, returns: Month, Year.
  441.                Usage: DateText3(<dDate>)
  442. Age2()      -- Returns age of someone on the date of a specific event.
  443.                Usage: Age2(<dDate>,<dEvent>)
  444. Annivrsry() -- Checks to see if a birthday or other specific "anniversary" is 
  445.                within a range of dates.
  446.                Usage: Annivrsry(<dTest>,<dBegin>,<dEnd>)
  447. AddMonths() -- Returns the exact date 'N' months from give date.
  448.                Usage: AddMonths(<dDate>,<nMonths>)
  449. AddYears()  -- Returns the exact date 'N' Years from given date.
  450.                Usage: AddYears(<dDate>,<nYears>)
  451. IsLeap()    -- Returns .t./.f. if year is a leap year... (year in YY or YYYY
  452.                formats)
  453.                Usage: IsLeap(<nYear>)
  454. DoY()       -- Day of Year -- returns "Julian" date (US Government version ...)
  455.                -- this is the number of days a date is from January 1 of that
  456.                year (i.e., 11/14/91 = 318).
  457.                Usage: DoY(<dDate>)
  458. WeekNo()    -- Returns the week number of the date (there are 52 weeks a year,
  459.                right?). 
  460.                Usage: WeekNo(<dDate>)
  461. Holiday()   -- Returns the date of specific "floating" holidays for a given
  462.                year, requires a one-letter code. See full doc in DATES.PRG.
  463.                Usage: Holiday(<nYear>,<cCode>)
  464.                Where cCode may be one of the following:
  465.                      P = President's Day
  466.                      D = Daylight Saving Time
  467.                      M = Memorial Day
  468.                      L = Labor Day
  469.                      C = Columbus Day
  470.                      S = Return to "Standard" Time
  471.                      E = Election Day
  472.                      T = Thanksgiving Day
  473.                      A = Advent 1st Sunday
  474. EasterDay() -- This returns the day of Easter. It doesn't work as easily as
  475.                those dates given above, so has it's own function.
  476.                Usage: EasterDay(<nYear>) && nYear = YYYY format
  477. nDoW()      -- Numeric Day of Week -- used to return the numeric value of a 
  478.                character day of the week, useful for some of the revised
  479.                functions below.
  480.                Usage: nDoW(<cDay>)
  481. FWDoM()     -- First Working Day Of the Month -- this returns the first working
  482.                day of the month passed to the function.
  483.                Usage: FWDoM(<dDate>)
  484. LWDoM()     -- Last Working Day Of the Month --  returns the last working day
  485.                of the month passed to the function.
  486.                Usage: LWDoM(<dDate>)
  487. FDoD()      -- First Day of Date -- this returns the first occurrence of a given
  488.                day of the week within a month. For example, you might need the
  489.                first Monday of the month. 
  490.                Usage: FDoD(<dDate>,"<cDay>")  (cDay = Monday, Tuesday, etc.)
  491. LDoD()      -- Last Day of Date -- This returns the last occurrence of a given
  492.                day of the week within a month. For example, you might need the 
  493.                last Monday in a month.
  494.                Usage: LDoD(<dDate>,"<cDay>")
  495. LDoM()      -- Last Day of Month -- this returns the last day of the month
  496.                as a date. It's used in LDoD and LWDoM above.
  497.                Usage: LDoM(<dDate>)
  498. NumDoD()    -- Number of Day of Date -- this returns a specific occurrence of a
  499.                given day of the week within a month. For example, you might need
  500.                the 3rd Tuesday of the month.
  501.                Usage: NumDoD(<dDate>,<nDay>,"<cDay>")
  502. WDIF()      -- Work Days In the Future -- this is used to return the date based
  503.                on a number of work-days from another date. For example, you 
  504.                could find the date of the 10th work date from today (date())
  505.                by using date(),10 as the parameters in the format below. This
  506.                function can use a HOLIDAYS database to be more accurate, but
  507.                you must create it in a specific format (see complete function 
  508.                documentation in the file DATES.PRG).
  509.                Usage: WDiF(<dStart>,nWDays)
  510. StoD()      -- String to Date -- this returns a "normal" dBASE date from a
  511.                character string containing formats of YYYYMMDD or YYMMDD.
  512.                Usage: StoD("<cString>")
  513. Quarter()   -- This function returns the "Quarter" of the year that a specified
  514.                date is in ...
  515.                Usage: Quarter(<dDate>)
  516. Dat2Jul()   -- Convert dBASE date to Julian date
  517.                Usage: Dat2Jul(<dDate>)
  518. Jul2Dat()   -- Convert Julian date to dBASE date
  519.                Usage: Jul2Dat(<nJulian>)
  520. FrstNxtMth()-- Returns the first day of next month, given a date in 'current'
  521.                month.
  522.                Usage: FrstNxtMth(<dDate>)
  523.  
  524. ---------------------------------
  525. TIME.PRG Time Processing Routines
  526. ---------------------------------
  527. Delay()     -- Delay loop in seconds.
  528.                Usage: Delay(<nSeconds>)
  529. Time2Sec()  -- Convert time string to seconds.
  530.                Usage: Time2Sec(<cTime>)
  531. Sec2Time()  -- Convert seconds to time string.
  532.                Usage: Sec2Time(<nSeconds>)
  533. DiffTime()  -- Calculate difference btween two time strings.
  534.                Usage: DiffTime(<cTime1>,<cTime2>)
  535. Civ2Mil()   -- Convert civilian time string (i.e., "12:59 A.M.") to 24 hour
  536.                (military) time.
  537.                Usage: Civ2Mil(<cCivilTime>)
  538. Mil2Civ()   -- Convert military (24 hour) time to Civilian time.
  539.                Usage: Mil2Civ(<cMilTime>)
  540.  
  541. --------------------------------
  542. FINANCE.PRG -- Finance Functions
  543. --------------------------------
  544. Discount()  -- Compute the present value of an amount received at the end of
  545.                a number of periods given a periodic interest rate.
  546.                Usage: Discount(<nFuturVal>,<nRate>,<nPeriods>)
  547. FuturVal()  -- Compute the future value of an initial amount at compound
  548.                interest received at a given periodic rate for a number of 
  549.                periods.
  550.                Usage: FuturVal(<nPresVal>,<nRate>,<nPeriods>)
  551. Rate()      -- Compute rate of periodic interest needed to produce a future
  552.                value from a present value in a given number of periods.
  553.                Usage: Rate(<nFutVal>,<nPresVal>,<nPeriods>)
  554. ContRate()  -- Compute rate if compounding is continuous.
  555.                Usage: ContRate(<nFutVal>,<nPresVal>,<nYears>)
  556. NPV()       -- Net Present Value of array aCashFlow[n].
  557.                Usage: NPV(<nRate>,<nPeriods>)
  558. IRR()       -- Internal Rate of Return, using ZeroIn().
  559.                Usage: Irr(<fX1>,<fX2>,<n_Flag>)
  560.  
  561. --------------------------------------
  562. ARRAY.PRG -- Array Processing Routines
  563. --------------------------------------
  564. AFill()     -- Fills an array with sequential elements. Useful for testing
  565.                array processing routines.
  566.                Usage: FillArray(<aArray>,<nArraySize>,<nFirstValue>,<nStep>)
  567. AMask()     -- Returns a "mask" specifying the desired row or column of an
  568.                array.
  569.                Usage: AMask(<cArrayskel>,<cVar>)
  570. AMean()     -- Mean of non-blank numeric or date values in specified row or
  571.                column of an array.
  572.                Usage: AMean(<cArrayskel>)
  573. AMax()      -- Maximum non-blank numeric, date or character value in specified
  574.                row or column of an array.
  575.                Usage: AMax(<cArrayskel>)
  576. AMin()      -- Minimum non-blank numeric, date or character value in specified
  577.                row or column of an array.
  578.                Usage: AMin(<cArrayskel>)
  579. AVar()      -- Finds population variance of non-blank numeric or date values
  580.                in specified row or column of a specified array.
  581.                Usage: AVar(<cArrayskel>)
  582. ASeek()     -- Performs a binary search in any specified ascending-sorted row
  583.                or column of an array.
  584.                Usage: aSeek(<cFindItem>,<aArray>,<nArraySize>)
  585. AShuffle()  -- Performs a shuffle of elements of an array randomly ...
  586.                Usage: aShuffle(<aArray>,<nLength>)
  587. ABubble()--    Performs a bubble sort (slow) on an array. By telling the
  588.                routine the number of passes, you can have it stop at a specific
  589.                point, and obtain some of the highest or lowest values, without
  590.                taking the time to perform a complete sort. To perform a
  591.                complete sort, pass the same value for nPasses as for nLength 
  592.                (number of elements in array) -- if you want a complete sort,
  593.                however, you may want to take another look at ShellSort()
  594.                below ... it's faster.
  595.                Usage: aBubble(<aArray>,<nLength>,<nPasses>)
  596. ArrayRows() -- Returns number of rows (elements) in an array.
  597.                Usage: ArrayRows(<aArray>)
  598. ArrayCols() -- Returns number of columns in an array.
  599.                Usage: ArrayCols(<aArray>)
  600. ShellSort() -- Performs a fast sort routine on an array. This array must be
  601.                copied into an array called: aMyArray. 
  602.                Usage: ShellSort(<nNumber>)
  603. ARec2Arr()  -- Creates a public array, aRecord[n], initialized to the record
  604.                format of the currently selected DBF, either blank or filled
  605.                with the values of the current record.
  606.                Usage: ARec2Arr(<lBlank>)
  607. aPullSort() -- Performs a sort on an array. This array must be copied into an
  608.                array called: aMyArray. This routine is theoretically faster than
  609.                the ShellSort() routine above, and definitely faster than the
  610.                aBubble() routine above.
  611.                Usage: aPullSort(<nNumber>)
  612.  
  613. -----------------------------------------
  614. MEASURE.PRG -- Conversion of Measurements
  615. -----------------------------------------
  616. Kg2Lb()     -- Used to convert Kilograms to Pounds.
  617.                Usage: Kg2Lb(<nKg>)
  618. Lb2Kg()     -- Used to convert Pounds to Kilograms.
  619.                Usage: Lb2Kg(<nPounds>)
  620. Inch2Cm()   -- Inches to Centimeters.
  621.                Usage: Inch2Cm(<nInches>)
  622. Cm2Inch()   -- Centimeters to Inches.
  623.                Usage: Cm2Inch(<nCm>)
  624. Km2Mile()   -- Kilometers to Miles.
  625.                Usage: Km2Mile(<nKm>)
  626. Mile2Km()   -- Miles to Kilometers.
  627.                Usage: Mile2Km(<nMiles>)
  628. Km2Naut()   -- Kilometers to Nautical miles.
  629.                Usage: Km2Naut(<nKm>)
  630. Naut2Km()   -- Nautical miles to Kilometers.
  631.                Usage: Naut2Km(<nNautMiles>)
  632. Naut2Stat() -- Nautical miles to Statute miles (approximate).
  633.                Usage: Naut2Stat(<nNautMiles>)
  634. Stat2Naut() -- Statute miles to Nautical miles (approximate).
  635.                Usage: Stat2Naut(<nStatMiles>)
  636. Fahr2Cel()  -- Fahrenheit to Celsius.
  637.                Usage: Fahr2Cel(<nFahrTemp>)
  638. Cel2Fahr()  -- Celsius to Fahrenheit.
  639.                Usage: Cel2Fahr(<nCelTemp>)
  640. Gal2Ltr()   -- US Gallons to Liters
  641.                Usage: Gal2Ltr(<nGal>)
  642. Ltr2Gal()   -- Liters to US Gallons
  643.                Usage: Ltr2Gal(<nLiters>)
  644. CuFt2Gal()  -- Cubic feet to US Gallons
  645.                Usage: CuFt2Gal(<nCubicFeet>)
  646. Gal2CuFt()  -- US Gallons to Cubic Feet
  647.                Usage: Gal2CuFt(<nGallons>)
  648.  
  649. -----------------------------------
  650. TRIG.PRG -- Trigonometric Functions
  651. -----------------------------------
  652. Note, all of these have the Usage:  FUNC(<nX>)
  653.  
  654. Secant()    -- Secant of an angle X in radians.
  655. Cosecant()  -- CoSecant of an angle X in radians.
  656. CoTan()     -- CoTangent of an angle X in radians.
  657. ASec()      -- Inverse Secant - angle size in radians.
  658. ACoSec()    -- Inverse Cosecant - angle size in radians.
  659. ACoT()      -- Inverse CoTangent
  660. SinH()      -- Hyperbolic Sine
  661. CosH()      -- Hyperbolic CoSine
  662. TanH()      -- Hyperbolic Tangent
  663. SecH()      -- Hyperbolic Secant
  664. CScH()      -- Hyperbolic CoSecant
  665. CoTH()      -- Hyperbolic CoTangent
  666. ASinH()     -- Inverse Hyperbolic Sine
  667. ACosH()     -- Inverse Hyperbolic CoSine
  668. ATanH()     -- Inverse Hyperbolic Tangent
  669. ASecH()     -- Inverse Hyperbolic Secant
  670. ACscH()     -- Inverse Hyperbolic CoSecant
  671. ACotH()     -- Inverse Hyperbolic Cotangent
  672. Hav()       -- Haversine 
  673. AHav()      -- Inverse Haversine
  674.  
  675. -----------------------------------
  676. NAVIGATE.PRG -- Navigation Routines
  677. -----------------------------------
  678. Correct()   -- Correction of direction - adjusts direction given, in degrees,
  679.                by a second number of degrees.
  680.                Usage: Correct(<nDirection>,<xCorrection>)
  681. UnCorrect() -- Uncorrection of direction - adjusts direction given, as above.
  682.                This is the inverse of Correct().
  683.                Usage: UnCorrect(<nDirection>,<xUnCorr>)
  684. XAngle()    -- Angle in degrees (<=90) at which two vectors in degrees
  685.                intersect.
  686.                Usage: XAngle(<nVector1>,<nVector2>)
  687. LeftWind()  -- Effect of second vector on first.
  688.                Usage: LeftWind(<nCourse>,<nWindFrom>)
  689. TailWind()  -- Is the effect of second vector on first additive?
  690.                Usage: TailWind(<nCourse>,<nWindFrom>)
  691. Heading()   -- Heading required to make good a course.
  692.                Usage: Heading(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  693. Course()    -- Course made good given heading, speed, wind dir, and force.
  694.                Usage: Course(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  695. GndSpeed()  -- Speed over the ground given heading, etc.
  696.                Usage: GndSpeed(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  697. Deg2Num()   -- Degrees to numbers ... converts character description of
  698.                degrees (Degrees Minutes Seconds:  40d50'30.2 N) to numeric
  699.                value.
  700.                Usage: Deg2Num("<cDms>")
  701. BearsDist() -- Distance to an object at the time of the second bearing.
  702.                Usage: BearsDist(<nBear1>,<nBear2>,<nRun>)
  703. BearsPass() -- Distance at which an object will be when abeam given 2 bearings.
  704.                Usage: BearsPass(<nBear1>,<nBear2>,<nRun>)
  705. BearsRun()  -- Distance to run until object will be abeam given two bearings.
  706.                Usage: BearsRun(<nBear1>,<nBear2>,<nRun>)
  707. GCDist()    -- Great Circle distance between 2 points given latitude and long.
  708.                of each. 
  709.                Usage: GcDist(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  710. GcCourse()  -- Initial Great Circle course between two points given lat and 
  711.                long of each. (Following a 'Great Circle' requires course 
  712.                changes.
  713.                Usage: GcCourse(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  714.  
  715. ---------------------------------
  716. STATS.PRG -- Statistical Routines
  717. ---------------------------------
  718. Samplevar() -- Finds sample variance of specified field of the current database.
  719.                Usage: SampleVar(<cField>[,<cClause>])
  720. Stny()      -- Returns value of the standard normal distribution function given
  721.                a number of standard deviations from the mean.
  722.                Usage: Stny(<nDevs>)
  723. StnArea()   -- Area of the standard normal distribution function between mean
  724.                and given number of standard deviations from the mean.
  725.                Usage: StnArea(<nDevs>)
  726. Stnz()      -- Lookup table to find the values of 'z', standard deviations,
  727.                corresponding to the most common areas inside a given number
  728.                of tails of the normal distribution function.
  729.               Usage: Stnz(<nProb>,<nTails>)
  730. StnDiff()   -- Determines whether hypothesis that sample of a given mean is
  731.                different from expected mean is justified.
  732.                Usage: StnDiff(<nConf>,<nTails>,<nSample>,<nSampMean>,;
  733.                                <nPopMean>,<nPopStd>)
  734. StnDevs()   -- Calculates 'z', standard deviations, corresponding to any
  735.                area of standard normal curve between mean and the desired
  736.                z. Much slower than Stnz().
  737.                Usage: StnDevs(<nArea>)
  738. TstnArea()  -- Translation function to convert area to left of point under
  739.                standard normal curve to 0 for ZeroIn().
  740.                Usage: TstnArea(<nDevs>,<nArea>)
  741. ZeroIn()    -- Finds a zero of a continuous function.
  742.                Usage: ZeroIn(<cFunction>,<fX1>,fX2>,<fAbsError>,<nMaxiter>,;
  743.                               <n_Flag>)
  744.  
  745. ---------------------------------------
  746. FIELDS.PRG -- Field Processing Routines
  747. ---------------------------------------
  748. MemoPagr()  -- Used to display a memo in a window on screen, allows user to
  749.                scroll up and down through memo.
  750.                Usage: MemoPagr("<cMemo>",<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  751. ScanMemo    -- Used to remove hard returns in all memo fields in all records
  752.                of a specified database.
  753.                Usage: Do ScanMemo with "<cDbf>"
  754. Cut         -- Used to cut to a global memvar CLIPBOARD the contents of a field
  755.                or memvar on screen (during a read) -- can then be used with
  756.                PASTE.
  757.                Usage: do Cut with "<cFld>","<cScrType>"
  758. Copy        -- Used to COPY to a global memvar CLIPBOARD the contents of a
  759.                field or memvar on screen, so it can be used with PASTE.
  760.                Usage: do Copy with "<cFld>"
  761. Paste       -- Used to paste the contents of CLIPBOARD (global memvar) to
  762.                the current field.
  763.                Usage: do Paste with "<cFld>","<cScrType>"
  764. Blanker()   -- Used to blank out a numeric field upon input of a valid numeric
  765.                item. Useful with GETs ...
  766.                Usage: Blanker()
  767.  
  768. -----------------------------------
  769. FILES.PRG -- File Handling Routines
  770. -----------------------------------
  771. AllTags     -- Used to bring up a popup/picklist of MDX tags ... can be
  772.                assigned to a function key.
  773.                Usage: do AllTags with <nULRow>,<nULCol>
  774. RedoTags    -- Used to deal with "bloated" MDX files. This will delete old
  775.                tags and recreate the MDX file, reducing the size of it, and
  776.                making access faster. 
  777.                Usage: do RedoTags with "<cDBF>" && note, do not include ext.
  778. AutoRedo    -- Used to bring up a picklist of DBF files, so that you (or the
  779.                user) can choose which to redo the tags for.
  780.                Usage: do AutoRedo with <nXTL>,<nYTL>,<nXBR>,<nYBR>,<cColor>)
  781. PrntTags    -- Used to print a list of tags/expressions to either the printer
  782.                or a file for a specific database.
  783.                Usage: do PrntTags with "<cDBF>"
  784. ListDBFs    -- Used to create a simple database (DBFS.DBF) containing the names
  785.                of all databases in the current directory.
  786.                Usage: do ListDBFs
  787. ReCompile() -- Recompiles all dBASE source-code files. 
  788.                Usage: Recompile([<cDir>],[,<cSkel>[,"R"]])
  789. MakeDbf     -- Makes an empty DBF.
  790.                Usage: Do MakeDbf with <cFileName>,<aArray>
  791. MakeDbf2    -- Makes an empty DBF, assumes array aMakeDBF[n,5].
  792.                Usage: Do MakeDBF with <cDBFpath>,<cStruPath>
  793. MakeStru()  -- Makes an empty dBASE Structure EXTENDED file and returns its
  794.                root name.
  795.                Usage: MakeStru()
  796. MakeStru2() -- Makes an empty dBASE Structure EXTENDED file, using dBASE print
  797.                redirection. User/programmer may specify to save database
  798.                in directory specified by DBTMP (DOS Environment variable) or
  799.                in the current directory.
  800.                Usage: MakeStru2(<lDBTmp>)
  801. TempName()  -- Returns a name that can be used for a file of given extension
  802.                without conflicting with names of existing files. If extension
  803.                is 'DBF', assures that no .DBT or .MDX of that name exists as 
  804.                well.
  805.                Usage: TempName(<cExtension>,<lDBTmp>)
  806. FileMove    -- Used to handle data entry/editing, allowing the user to move
  807.                through the database by pressing specific keys. See internal
  808.                docs for more detail.
  809.                Usage: do FileMove with <nKey>
  810. Used()      -- Checks to see if a database is currently in use -- returns a
  811.                logical.
  812.                Usage: Used("<cFile>")
  813. MDXByte()   -- Used to set the MDX Byte in a DBF header ON or OFF.
  814.                Usage: MDXByte(<cDBFPath>,<cOnOff>)
  815. aDir()      -- Creates a public array GADIR[n,4] containing directory 
  816.                information. It is limited to 292 files or less, depending on
  817.                the memory available. Requires SEARCH.BIN.
  818.                Usage: aDir(<cFMask>,<cBINPath>,<cAttr>)
  819. DBFDir()    -- Creates (or Overwrites) DBDDIR.DBF, and populates it with
  820.                directory information. Uses the DOS 5.0 DIR command, and requires
  821.                DOS 5.0. DO NOT ATTEMPT TO USE WITH PREVIOUS VERSIONS OF DOS.
  822.                Usage: DBFDir(<cPathSkel>,<lHidSys>)
  823. ParsPath()  -- Extracts and returns the path from a full path file 
  824.                specification.
  825.                Usage: ParsPath(<cFullPath>)
  826. TagPop      -- Brings up a picklist of .MDX Tags for current database, so user
  827.                can change sequence data is listed in. Lists key, whether or not
  828.                tag has a 'for' clause or is unique, and gives most (if not all)
  829.                of expression for the tag.
  830.                Usage: do TagPop
  831. AAppend()   -- Appends a text file into an array. This routine is limited to
  832.                text files of 1,170 lines, and 254 characters per line. The
  833.                text file must be an ASCII .TXT formatted file. Warning -- if
  834.                array already exists, it will be overwritten.
  835.                Usage: AAppend(<cFileName>,<aArrayName>)
  836. FDel()      -- Deletes a given portion of a file (text or binary) from the
  837.                beginning of the file, end of the file, or current pointer
  838.                position. 
  839.                Usage: FDel(<nHandle>,<nBytes>,<nStart>)
  840. FGetLine()  -- Extracts a line of text from a text file.
  841.                Usage: FGetLine(<cFileName>,<cLookup>[,<lCase>[,<lEntire>]])
  842. FIns()      -- Inserts specified number of nulls into a low-level file. See
  843.                comments on FDel().
  844.                Usage: FIns(<nHandle>,<nBytes>,<nStart>)
  845. GetInfo()   -- Retrieves information from STATUS that you cannot get with the
  846.                dBASE IV function SET(). Keywords are:
  847.                    WORK       Number of work area currently in
  848.                    PRINT      Current printer destination (PRN, NUL, etc.)
  849.                    ERROR      Error condition set by ON ERROR
  850.                    ESCAPE     Escape condition set by ON ESCAPE
  851.                    F2 to F10
  852.                    Ctrl-F1 to Ctrl-F10
  853.                    Shift-F1 to Shift-F10
  854.                               Current setting of each key as set by SET FUNCTION
  855.                    PAGE,LINE  Line number specified by ON PAGE AT LINE
  856.                    HANDLE,<filename>
  857.                               Handle number of low-level file <filename>
  858.                    NAME,<filehandle>
  859.                               Filename of low-level file specified by 
  860.                                 <filehandle>
  861.                    MODE,<filehandle>
  862.                               Privilege of low-level file spec. by <filehandle>
  863.                Usage: GetInfo(<cKeyWord>[,<cKeyWord2>])
  864. TextLine()  -- Returns the number of lines of text in an ASCII Text file.
  865.                Usage: TextLine(<cTextFile>)
  866. TLine()     -- Returns a specific line in an ASCII Text File.
  867.                Usage: TLine(<cTextFile>,<nLine>)
  868. TLineNo()   -- Returns the line number of the phrase you are searching for
  869.                in an ASCII Text File.
  870.                Usage: TLineNO(<cTextFile>,<cLookup>[,<lCase])
  871. TempFile()  -- Returns a random filename in temporary directory.
  872.                Usage: TempFile([cFileExt])
  873. TempDir()   -- Returns path of temporary directory as set from DOS (i.e.,
  874.                SET DBTMP=...).
  875.  
  876. ----------------------------------
  877. MISC.PRG -- Miscellaneous Routines
  878. ----------------------------------
  879. PlayIt()    -- Plays a song based on parameter passed. 1 = Dirge, 
  880.                2 = "touchdown", programmer may add more as needed ...
  881.                Usage: PlayIt(<nSong>)
  882. PageEst     -- Will estimate number of pages in a report, and then ask if you
  883.                wish to generate said report ... requires three parameters:
  884.                nCount = record count (may be 0, in which case procedure will
  885.                         try to count the records)
  886.                cReport = report name, with any FOR condition you wish -- if
  887.                          you use a FOR condition, and give a '0' for the nCount
  888.                          parameter, the procedure will count the records that
  889.                          match the FOR (only a FOR is setup at the moment).
  890.                nRecords = number of records that will print on a page. If you
  891.                          send '0', the procedure will calculate based on 60 
  892.                          records to the page.
  893.                Usage: do PageEst with <nCount>,"<cReport>",<nRecords>
  894. Permutes()  -- Permutations of a number of items taken x amount at a time.
  895.                Usage: Permutes(<nNum>,<nHowMany>
  896. Combos()    -- Combinations, similar to above -- slight difference. See docs.
  897.                Usage: Combos(<nNum>,<nHowMany>)
  898. BinLoad()   -- A function used to manage .BIN files.
  899.                Usage: BinLoad(<cBinName>)
  900. DialUp()    -- A simple dialer routine. (No longer requires LOWLEVEL.BIN)
  901.                Usage: DialUp(<cPhoneNo>)
  902. CurrPort()  -- Returns the current port being used by the SET PRINT command.
  903.                Requires a database (CURRPORT.DBF, one field, 80 characters,
  904.                called CURRPRT, indexed on said field ...)
  905.                Usage: CurrPort()
  906. FileLock()  -- Returns a logical if an attempt to lock a file on a LAN was
  907.                successful, displays a message otherwise.
  908.                Usage: FileLock("<cColor>")
  909. RecLock()   -- Returns a logical if an attempt to lock a record on a LAN was
  910.                successful, displays a message otherwise.
  911.                Usage: RecLock("<cColor>")
  912. DosShell    -- Swaps out dBASE from memory, loads a DOS shell.
  913.                Usage: do DosShell with <cAppName>
  914. IsDisk()    -- Checks a disk in a disk drive to see if it's valid (door open,
  915.                unformatted disk, etc.). Uses DISK.BIN.
  916.                Usage: IsDisk("<cDrive>","<cColMess>","<cColErr>")
  917.  
  918. -------------------------------------
  919. SCA.PRG -- SCA Date Handling Routines
  920. -------------------------------------
  921. SCA_Real    -- Special purpose for SCA (Society for Creative Anachronism),
  922.                brings up a window, enter date in SCA dates, converts to "real"
  923.                dates (dBASE format).
  924.                Usage: do SCA_Real
  925. SCA2Real()  -- This function works like SCA_Real, without the user-input.
  926.                Usage: SCA2Real(<cDay>,<cMonth>,<cYear>) && cyear=Roman Numeral
  927. Real_SCA()  -- Used to convert 'real' (dBASE format) dates into SCA dates.
  928.                (see SCA_Real Procedure above)
  929.                Usage: Real_SCA(<dDate>)
  930.  
  931. ------------------------------------------------------
  932. FRPG.PRG -- FRPG (Fantasy Role-Playing Games) ROUTINES
  933. ------------------------------------------------------
  934. SetRand     -- Procedure used to set a random # table, based on the time it
  935.                is called, multiplied by the seconds at that moment. Useful
  936.                for calling before using any of routines below. Used ONCE
  937.                in a dBASE session, should be enough. The reason for this
  938.                procedure is that I have found that using RAND(-1) often returns
  939.                exactly the same values if the exact same function call (i.e.,
  940.                Dice() below) is made several times. This doesn't, therefore,
  941.                do what I want. By using the current TIME, I can get a different
  942.                random number table each time. Use EITHER this function OR
  943.                RAND(-1) during any one session of dBASE.
  944. Dice()      -- Used to simulate the roll of a dice, will handle different types
  945.                of dice (for FRPG type games, where you have 4,6,8,10,12,20,100
  946.                sided dice ...)
  947.                Usage: Dice(<nSides>)
  948. MultDice()  -- As above but for multiple die (more than one).
  949.                Usage: MultDice(<nNum>,<nSides>)
  950. ValiDice()  -- Asks a gamer to enter a valid die roll, GM/Programmer specifies
  951.                # of dice, number of sides ... (i.e., 3d6 is 3 six-sided dice,
  952.                if GM says: 3,6 the program will ask for a value from 3 to 18,
  953.                and not allow any other input).
  954.                Usage: ValiDice(<nNum>,<nSides>,"<cMessage>","<cColor>")
  955. DiceChoose()-- Presents three choices (in menu format) for gamer to use, die
  956.                dice rolls ...
  957.                Usage: DiceChoose(<nNum>,<nSides>,"<cMessage>","<cColor>")
  958. ParseDice() -- Used to parse character field/memvar for xdy+z format of dice
  959.                (a standard gaming format) and evaluate the value. I.e.,
  960.                3d6+1 = 3 six-sided dice, +1 for each die rolled, giving a
  961.                range from 6 to 21 -- function will return random number in 
  962.                that range (actually "rolling" 3 six-sided dice, adding 1 in
  963.                example). 
  964.                Usage: ParseDice("<cDiceString>")
  965. PopDice        Used to popup a place the user can enter a quick die roll, and
  966.                have the computer do the actual dice rolling. Handy little
  967.                routine ...
  968.                Usage: do PopDice with <cColor>
  969.                Example: ON KEY LABEL ALT-D DO POPDICE WITH "rg+/rg,w+/n,rg+/rg"
  970.  
  971. --------------------------------------------------------------------------------
  972. WINDOWS.PRG -- People are beginning to want things that look like MicroSoft
  973. Windows. Here are routines that do some of that. 
  974. --------------------------------------------------------------------------------
  975. Alert()      -- A popup with an "OK" pad, designed to force the user to
  976.                 acknowledge the message.
  977.                 Usage: Alert("<cTitle>","<cMessage>")
  978. CheckBox()   -- One line message, with a check box to change the status of
  979.                 a logical memvar.
  980.                 Usage: CheckBox(<lVar>,"<cTitle>",<nRow>,<nCol>,<nAscii>)
  981. CheckBx1()   -- Same as above, but is programmed a bit differently.
  982.                 Usage: CheckBx1(<lVar>,"<cTitle>",<nRow>,<nCol>)
  983. DropDown()   -- Performs a picklist with an array, or a field in a database.
  984.                 Holds a choice in a holding area, allowing user to use that,
  985.                 or select something else.
  986.                 Usage: DropDown("<cType>","<cName>",[<nRow,[<nCol>,[<nSize>]]])
  987. MSWind()     -- Creates a window that acts like a "MS Windows" window, in that
  988.                 you can move it, enlarge it to full screen, and bring it
  989.                 back to its original size.
  990.                 Usage: MSWind(<nTop>,<nLeft>,<nLower>,<nRight>)
  991. Enlarge      -- Routine used with MSWIND() above to enlarge the window.
  992.                 Usage: do Enlarge
  993. MoveWinU     -- Routine used to Move the window (MSWIND()) up on the screen.
  994.                 Usage: do MoveWinU
  995. MoveWinD     -- Same as above to move window (MSWIND()) down.
  996.                 Usage: do MoveWinD
  997. MSWinAct     -- Used to perform action(s) inside the window (MSWIND()).
  998.                 This routine should be modified for each specific system ...
  999.                 This one is just a sample ...
  1000.                 Usage: do MSWinAct with <nTop>,<nLeft>
  1001. RadioBut()   -- Radio Button routine.
  1002.                 Usage: RadioBut("<cArray>",<nRow>,<nCol>,<nDefPad>,<nAscii>)
  1003. TmpRadio     -- Used to set/reset temporary array aTmpRadio used with RadioBut()
  1004.                 routine above.
  1005.                 Usage: Do TmpRadio
  1006. ScrolBar()   -- Performs a horizontal scroll-bar to find a record in a database
  1007.                 file.
  1008.                 Usage: ScrolBar(<nAtLine>)
  1009. Alert2()     -- Same as Alert() above, but uses a Window, shadow, and 
  1010.                 programmable colors.
  1011.                 Usage: Alert2("<cTitle>","<cMessage>","<cColor>")
  1012. MSWind2()    -- Acts like above, but title (due to a ... feature ... of dBASE IV
  1013.                 version 1.5) does not display if enlarged.
  1014.                 Usage: MsWind2(<nTop>,<nLeft>,<nLower>,<nRight>,"<cColor>",;
  1015.                                "<cTitle>")
  1016. Enlarge2     -- Used with MSWind2() to enlarge to full-screen.
  1017.                 Usage: do Enlarge2 with cTitle, cTitlCol
  1018. MoveWind     -- Used with MSWind2() to move the window.
  1019.                 Usage: do MoveWin with <pPad>
  1020. MSWinAt2     -- Used to perform an action inside the window from MSWind2().
  1021.                 Usage: do MSWinAt2
  1022. FieldNum()   -- Used to return the number of a given fieldname in the database
  1023.                 structure. Works only on an open database.
  1024.                 Usage: FieldNum("<cFldName>")
  1025.  
  1026. --------------------------------------------------------------------------------
  1027. OBSOLETE.PRG -- These are functions that, due to the advent of dBASE IV, 1.5,
  1028. (or other reasons) are no longer necessary. However, if you are a user of 1.1,
  1029. and/or wish to still use these functions, they are still available, but with
  1030. little support.
  1031. --------------------------------------------------------------------------------
  1032. Empty()     -- Returns a logical (.t. or .f.) if a field or memvar is empty. 
  1033.                In release 1.5 this is replaced with the internal function: 
  1034.                ISBLANK().
  1035.                Usage: Empty(<cField>)
  1036.                Recommendation: If creating a system that uses both dBASE IV
  1037.                versions 1.5 and earlier versions, rename this function to 
  1038.                ISBLANK(). If the system is an earlier version of dBASE, this
  1039.                function will be used, and if 1.5 or later, the internal function
  1040.                will be used.
  1041. NumFlds()   -- Counts the fields in a given database. This is replaced in 
  1042.                version 1.5 of dBASE IV with FLDCOUNT().
  1043.                Usage: NumFlds(<cDBF>)
  1044. DateSet()   -- Returns a string giving name of current DATE format.
  1045.                Usage: DateSet()
  1046. StampVal()  -- Evaluates a 16-character string in the form of the rightmost 
  1047.                16 characters returned by the DOS DIR command for a file.
  1048.                Usage: StampVal(<cTimeStamp>)
  1049. FullWin     -- Handy to overlay a screen with a full-screen window ...
  1050.                Usage: do FullWin with "<cColor>","<cWinName>","<cScreen>"
  1051. SetColor    -- used to set a memory file with colors, or load colors into
  1052.                memory variables from a memory file.
  1053.                Usage: do SetColor
  1054. SetColor2   -- used to set a mem file as above, but asks for a parameter to
  1055.                be sent, so that when designing a system, you can ask the
  1056.                user if their monitor is color or mono ... you pass "Y" or
  1057.                "N" ... i.e.,
  1058.                Usage: do SetColor2 with "<cYN>"
  1059. ExtrClr()   -- Used to extract the first parameter of a color memory variable.
  1060.                Usage: ExtrClr(<cColorVar>)
  1061. InvClr()    -- Can invert the colors of a color memory variable.
  1062.                Usage: InvClr(<cColorVar>)
  1063.  
  1064. --------------------------------------------------------------------------------
  1065. Enjoy. Happy computing. 
  1066.  
  1067. KJM
  1068. --------------------------------------------------------------------------------
  1069. -- EoF: README.TXT
  1070. --------------------------------------------------------------------------------
  1071.